﻿///***************************************************************
/// 시  스  템 : Updms.Com.Exe
/// 단위시스템 : COM
/// 계      층 : Execute Layer (Relation Transaction)
/// 프로그램명 : Com9010m_RT
/// 파  일  명 : Com9010m_RT.cs
/// 설      명 : 첨부파일
///***************************************************************
/// 수정ID 일자       이름     내용
///---------------------------------------------------------------
/// CH001  2013-06-18 송시명   최초 작성
///***************************************************************
using System.EnterpriseServices;
using System.Runtime.InteropServices;

using SMFramework.Data;


namespace Updms.Com.Exe
{
	[ComVisible(true)]
	[Transaction(TransactionOption.Required)]
	[JustInTimeActivation(true)]
	public class Com9010m_RT : Base.AppFramework.RuleBase
	{
		public Com9010m_RT()
		{
		}

		#region InsertProcess
		/// <summary>
		/// 첨부파일을 삭제후 저장
		/// </summary>
		/// <param name="lo_dp"></param>
		/// <returns></returns>
		[AutoComplete]
		public int InsertProcess(DataPack lo_dp)
		{
			_exeTimeLog.Prepare();

			using (Dac.Com_Dac_UPDMS_COM_FILE _dac = new Dac.Com_Dac_UPDMS_COM_FILE())
			{
				return _dac.Insert(lo_dp);
			}
		}

		#endregion

		#region DeleteProcess
		/// <summary>
		/// 첨부파일 삭제
		/// </summary>
		/// <param name="ls_xml"></param>
		/// <returns></returns>
		[AutoComplete]
		public int DeleteProcess(string ls_xml)
		{
			_exeTimeLog.Prepare();

			using (Dac.Com_Dac_UPDMS_COM_FILE _dac = new Dac.Com_Dac_UPDMS_COM_FILE())
			{
				return _dac.Delete(ls_xml);
			}
		}

		#endregion

		#region DeleteByFileId
		/// <summary>
		/// 특정 파일만 삭제
		/// </summary>
		/// <param name="ls_xml"></param>
		/// <returns></returns>
		[AutoComplete]
		public int DeleteByFileId(string ls_xml)
		{
			_exeTimeLog.Prepare();

			using (Dac.Com_Dac_UPDMS_COM_FILE _dac = new Dac.Com_Dac_UPDMS_COM_FILE())
			{
				return _dac.DeleteByFileId(ls_xml);
			}
		}

		#endregion

	}
}
